<template>
  <div>
      <p>
          <input type="checkbox" v-model="agree">同意
      </p>
      <p>{{agree}}</p>
      <p>
          <input type="checkbox" value="唱歌" v-model="hobby">唱歌
          <input type="checkbox" value="篮球" v-model="hobby" >篮球
          <input type="checkbox" value="rap" v-model="hobby" >rap
      </p>
      <p>爱好是：{{hobby}}</p>
      <p>
          <input type="radio" value="male" v-model="sex">男
          <input type="radio" value="female" v-model="sex">女
      </p>
      <p>{{sex}}</p>
      <p>
          <img :src="sex=='male'?male:female" alt="">
      </p>
  </div>
</template>

<script>
import male from './assets/img/male.png'
import female from './assets/img/female.png'
export default {
    name:'Mycom1',
    data(){
        return{
            agree:true,
            hobby:[],
            sex:'male',
            male,
            female
        }
    }
}
</script>

<style>

</style>